package com.seavenois.alife2;

import java.util.Locale;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;

/*************************************************/
/* Simple activity that shows a web page *********/
/* containing the application changelog. *********
/*************************************************/
public class Changelog extends Activity{
	WebView webview;
	@Override 
	public void onCreate(Bundle savedInstanceState) { 
		super.onCreate(savedInstanceState);
		setContentView(R.layout.htmlview); 
		webview = (WebView) findViewById(R.id.WebViewWindow); 
		webview.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
		//Language to display
		Locale lo = Locale.getDefault();
		String lang = lo.getLanguage();
	    if(lang.equals("es"))
			webview.loadUrl("file:///android_asset/changelog.html");
	    	//TODO: Write other languages changelog
			//webview.loadUrl("file:///android_asset/changeloges.html");
	    else
	    	webview.loadUrl("file:///android_asset/changelog.html");
	}
}
